package cn.lizemin.builder.version0.entity;

/**
 * @author lzm
 * @version 1.0
 * @description: 别墅建造者
 * @date 2022/4/27 11:19
 */
public class HouseBuilder implements Builder {

    private Building house;

    public HouseBuilder() {
//        对成员变量进行初始化
        this.house = new Building();
    }

    @Override
    public void buildBasement() {
        house.buildBasement("别墅地基" + "\n");
        System.out.println("造别墅的地基");
    }

    @Override
    public void buildProof() {
        house.buildBasement("别墅屋顶" + "\n");
        System.out.println("造别墅的屋顶");
    }

    @Override
    public void buildWall() {
        house.buildBasement("别墅墙体" + "\n");
        System.out.println("造别墅的墙体");
    }

    @Override
    public Building getBuilding() {
        return this.house;
    }
}
